#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int cnt = 0;
	int l[11];
	scanf("%d %d %d %d %d %d %d %d %d %d", &l[0], &l[1], &l[2], &l[3], &l[4], &l[5], &l[6], &l[7], &l[8], &l[9]);
	sort(l, l + 10);
	int h;
	scanf("%d", &h);
	h += 30;
	for (int i = 0; i < 10; i++)
	{
		if (l[i] <= h) cnt++;
		else break;
	}
	printf("%d\n", cnt);
    return 0;
}